#include <iostream>
#include <fstream>
#include "GrammarLoader.h"
#include "PredictiveParser.h"

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    GrammarLoader loader;
    Grammar *grammar = loader.LoadGrammar("grammar1.txt");
    PredictiveParser parser;
    parser.SetGramer(grammar);
    // TODO generate firdt & follow for the grammar
    Tokenizer tokenizer("input1.txt");
    ofstream grammarExpantion;
    grammarExpantion.open("expansion1.txt", ios::out);
    parser.Parse(tokenizer, grammarExpantion);
    grammarExpantion.close();
    delete grammar;
    return 0;
}
